﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;
using ModuleAddPlace.ViewModels;

namespace ModuleAddPlace.Commands
{
    public class AddAddressCommand : ICommand
    {
        private IAddPlaceViewModel m_addPlaceViewModel;

        public AddAddressCommand(IAddPlaceViewModel addPlaceViewModel)
        {
            m_addPlaceViewModel = addPlaceViewModel;
        }

        public bool CanExecute(object parameter)
        {
            return true;
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            m_addPlaceViewModel.RemoveAddedAddress();
        }
    }
}
